package com.bruip.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author 王若龙
 * @CreateTime 2022-09-05 20:05
 */
@Controller
public class TestViewController {

    /**
     * 测试thymeleaf视图
     *
     * @return {@link String}
     */
    @RequestMapping("/test/view/thymeleaf")
    public String testThymeleafView() {
        return "success";
    }

    /**
     * 转发视图
     * @return
     */
    @RequestMapping("/test/view/InternalResourceView")
    public String testInternalResourceView() {
        return "forward:/scope/model";
    }


    /**
     * 测试重定向
     *
     * @return {@link String}
     */
    @RequestMapping("/test/view/redirect")
    public String testRedirect() {

        return "redirect:/scope/model";
    }

}

